package nlppatents.util;

import java.util.ArrayList;

public class Phrase 
{
	// NN = noun phrase, VB = verb phrase, PP = prep phrase, WORD = word (cluster)
	public POS type; 
	public ArrayList<POSWord> words;
	
	public int length()
	{
		return words.size();
	}
	public POSWord get(int index)
	{
		return words.get(index);
	}
	public POSWord add(POSWord word)
	{
		words.add(word);
		words.trimToSize();
		return word;
	}
	
	public Phrase(POS type)
	{
		this.type = type;
		this.words = new ArrayList<POSWord>();
	}
}
